#include <string.h>
#include <memory.h>
int f_find_char (char str[], char *value){
    int num=0;
    for (int i = 0; i < strlen(str); i++){
        if(str[i] == value[0]){
         num++;
        }
    }
    return num;
}

int f_my_split(char buf[], const char *split, char *res[]) {
    char *bgn = buf;
    char *end = NULL;
    int index = 0;
    while(1) {
        end = strstr(bgn, split);
        memset(res[index], 0x00,sizeof(res[index]));
        if(end != NULL) {
            char tmp = *end;
            *end = '\0';
            strcpy(res[index], bgn);
            *end = tmp;
            bgn = end + (int)strlen(split);
        } else {
            strcpy(res[index], bgn);
            break;
        }
        index += 1;
    }
    return 0;
}
